//
//  CZCategoryModel.m
//  i0S007通用项目
//
//  Created by Apple on 16/2/20.
//  Copyright © 2016年 Apple. All rights reserved.
//

#import "CZCategoryModel.h"

@implementation CZCategoryModel

+ (instancetype)categoryModelWithDict:(NSDictionary *)dict {
    return [[self alloc] initWithDict:dict];
}

- (instancetype)initWithDict:(NSDictionary *)dict {
    if (self = [super init]) {
        // KVC来赋值
        [self setValuesForKeysWithDictionary:dict];
    }
    
    return self;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key {};

/// 实现模型的 description 方法
- (NSString *)description {
    return [NSString stringWithFormat:@"\t分类模型: highlighted_icon:%@, icon:%@, name:%@, small_highlighted_icon:%@, small_icon:%@, subcategories:%@", self.highlighted_icon, self.icon, self.name, self.small_highlighted_icon, self.small_icon, self.subcategories];
}
@end
